<?php
//商品类型模型
class TypeModel extends Model{
	//获取所有的商品类型
	public function getTypes(){
		$sql = "SELECT * FROM {$this->table}";
		return $this->db->getAll($sql);
	}
	//分页获取商品类型
	public function getPageTypes($offset,$limit){
		$sql = "SELECT * FROM {$this->table}
		        LIMIT $offset,$limit";
		return $this->db->getAll($sql);
	}
}